//获取个人信息
var token = localStorage.getItem('tok');
var iconimg="";
$.ajax({
    type: "GET",
    url: $host+'/api/app/person/userInfo',
    async: true,
    dataType:'json',
    data: {
        'token': token
    },
    success: function(result){
        console.log(result);
        if(result.status===900000){
            var data=result.data;
            $('.name').text(data.account);
            $('.dkphone').text(data.phone);
            iconimg=data.icon;
            if(iconimg){
                $('.information_icon').css('background','url('+iconimg+')no-repeat center/100% 100%');
                $('.information_icon').css('background-size','cover');
            }else {
                $('.information_icon').css('background',`url('../images/porfile_profile photo@2x.png')`);
                $('.information_icon').css('background-size','cover');
                console.log(1);
            }
        }else{
            window.location.href='dengluy.html?token='+token
        }

    },
    error:function(){
        console.log('接口错误')
    }
});
//点击个人信息区域
$('.information_name').click(function(){
    window.location.href='gerenxx.html?token='+token;
})